package com.study01;

public class Demo01 {
    public static void main(String[] args) {
        Person p1 = new Person();
        p1.name = "张三";
//        try {
//            p1.setAge(400);
//        } catch (PersonAgeException e) {
//            e.printStackTrace();
//        }
        try {
            p1.setAge(100);
        } catch (PersonAgeException e) {
            e.printStackTrace();
        }
        try {
            p1.setWeight(800);
        } catch (PersonWeightException e) {
            e.printStackTrace();
        }
    }
}